-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TF-M PSA template: Lock Approtect in network core #17093
TF-M PSA template: Lock Approtect in network core #17093
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:trusted-firmware-m: PR head: 8c7fae3936da02b7db4f5c8aba174b252a2b326e more detailstrusted-firmware-m:
sdk-nrf:
mcuboot:
Github labels
List of changed files detected by CI (22)
Outputs:ToolchainVersion: 3dd8985b56 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
358ddbc
to
ee9cdc2
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
modules/trusted-firmware-m/tfm_boards/common/nrf_provisioning.c
Outdated
Show resolved
Hide resolved
modules/trusted-firmware-m/tfm_boards/common/nrf_provisioning.c
Outdated
Show resolved
Hide resolved
modules/trusted-firmware-m/tfm_boards/common/nrf_provisioning.c
Outdated
Show resolved
Hide resolved
dd2e330
to
d79b499
Compare
d79b499
to
9827f06
Compare
modules/trusted-firmware-m/tfm_boards/common/nrf_provisioning.c
Outdated
Show resolved
Hide resolved
9827f06
to
cdb44e8
Compare
Overall this looks good to me, the only concern that I have is with the CONFIG_MCUBOOT_USE_ALL_AVAILABLE_RAM option. As long as we don't encrypt the firmware I don't see it as an issue but if we choose to encrypt the firmware is there any chance that this will leave the encryption key in the non secure memory in the end. Can someone from MCUBOOT comment on this? |
@hakonfam: I think that you had some thoughts about this. Could you comment on this? |
d39924c
to
12a7f13
Compare
6fc0fba
to
e49d903
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the changelog.
e49d903
to
0a89769
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ping @nrfconnect/ncs-co-build-system , @nrfconnect/ncs-pluto , @nrfconnect/ncs-code-owners |
0a89769
to
aac12dd
Compare
while (!nrfx_nvmc_write_done_check()) | ||
; | ||
|
||
pcd_done(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whilst not needed for this PR (or any future PRs), I assume this could fail to write e.g. if the device is purposely ran from too low a voltage that flash writing is available at or a clock/voltage glitch is used to skip the write, and it does not check that the write was successful before booting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that your point holds. If you could pass the writing to the the UICR part, and still hit the pcd_done, it could be problematic. However, this particular piece of code should still be run by the manufacturer so that the device will transition form provisioning to secure life-cycle-state.
samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf
Outdated
Show resolved
Hide resolved
ceea983
to
15677ce
Compare
Add a PCD command for locking the Approtect in B0n. Approtect will be locked from TF-M, which is separate from Zephyr OS. For this purpose, the relevant parts of PCD library are moved to a separate header, which can be used in both TF-M and Zephyr. If TF-M is used, delay locking of the PCD commands memory area to be done in TF-M. NCSDK-17920 Signed-off-by: Markus Lassila <[email protected]>
With nRF53, allow the network core Approtect to be locked from TF-M. This is done when we are transitioning from provisioning LCS to secure LCS. NCSDK-17920 Signed-off-by: Markus Lassila <[email protected]>
Add support for updating network core with nRF5340. External flash will be used for update images. NCSDK-17920 Signed-off-by: Markus Lassila <[email protected]>
15677ce
to
2779930
Compare
[celebrate] Lassila, Markus reacted to your message:
…________________________________
From: Robert Lubos ***@***.***>
Sent: Wednesday, October 23, 2024 10:09:37 AM
To: nrfconnect/sdk-nrf ***@***.***>
Cc: Lassila, Markus ***@***.***>; Mention ***@***.***>
Subject: Re: [nrfconnect/sdk-nrf] TF-M PSA template: Lock Approtect in network core (PR #17093)
Merged #17093<#17093> into main.
—
Reply to this email directly, view it on GitHub<#17093 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A5I26KRDNSBWA5WFRJPE2RLZ45YWDAVCNFSM6AAAAABNMB5MR6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUHAYDQNZWHEZTINA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Add support for locking the Approtect in nRF53 network core, when TF-M transforms from provisioning life-cycle-state (LCS) to secure LCS.
Needs following changes:
nrfconnect/sdk-trusted-firmware-m#172
nrfconnect/sdk-mcuboot#330
Identified weak points that I am (especially) looking comments for:
-> Comments received.
-> CONFIG_MCUBOOT_NRF_CLEANUP_NONSECURE_RAM, which clears the non-secure ram is set by SB_CONFIG_MCUBOOT_USE_ALL_AVAILABLE_RAM.